package com.initialize.pub.dao;

import com.initialize.pub.generate.pojo.User;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

/**
 * @program: Initialization_Project
 * @description:
 * @author: Mr.Jane
 * @create: 2019-10-10 22:32
 **/
public interface UserDAO {
    @Select({
            "SELECT * FROM `user` WHERE login = '123' AND psd = '123'"
    })
    @Results({
            @Result(column = "_id", property = "id", jdbcType = JdbcType.INTEGER, id = true),
            @Result(column = "login", property = "login", jdbcType = JdbcType.VARCHAR),
            @Result(column = "psd", property = "psd", jdbcType = JdbcType.VARCHAR),
            @Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR)
    })
    User login(String login, String psd);


}
